<?php
/**
 * Created by PhpStorm.
 * User: sosyuki
 * Date: 2018/6/4
 * Time: 14:20
 */

namespace Drupal\newmenu;


class newmenuRetrieveController {

  function features() {
    $list = [];
    foreach (module_implements('newmenu_feature_info') as $module) {
      $func = $module . '_newmenu_feature_info';
      $infos = $func();
      foreach ($infos as $key => $info) {
        $list[$module][$key] = [
          'icon' => mini_icons_get_icon($module, $info['mini_icon']),
          'url' => $info['url'],
          'title' => $info['title'],
        ];
      }
    }
    return $list;
  }
}